Ext.define('extjs6test.view.base.BaseGrid',{
    extend:'Ext.grid.Panel',
    requires:[
        'Ext.ux.SlidingPager',
        'extjs6test.view.base.BaseGridController',
        'Ext.grid.plugin.Exporter'
    ],
    selModel:{
        type:'checkboxmodel'
    },
    usePagingbar:true,
    border:false,
    minPageSize:10,
    plugins:[
        {
            ptype:'gridexporter',
            pluginId:'excelExporter'
        }
    ],
    controller:{
        type:'basegridcontroller'
    },
    forceFit:true,
    initComponent:function () {
        var me = this;
        if(me.usePagingbar){
            Ext.apply(me,{
                dockedItems:[
                    {
                        xtype:'pagingtoolbar',
                        reference:'pagingbar',
                        store:me.store,
                        dock:'bottom',
                        displayInfo:true,
                        plugins:new Ext.ux.SlidingPager()
                    }
                ]
            });
        }
        me.callParent(arguments);
    },
    listeners:{
        afterlayout:'onGridAfterlayout'
    }
});
